<%@page contentType= "text/html;charset=UTF-8" %>
<%@include file="/include/include.jsp"%>
<wst:jspns/>
<script type="text/javascript">
	$(document).ready(function(){
	
		var submitOptions = {
			success:function(){
				//关闭当前窗口
				$("#${param.parentJspns}newWindow").omDialog('close');
				//给出提醒
				$.omMessageTip.show({
            title : '提示',
            content : '新增成功',
            timeout : 1000
        });
				
				//刷新datagrid
				$('#${param.parentJspns}dataGrid').omGrid('orzSetData',$('#${param.parentJspns}queryForm'));
			}
		};
		
		$('#${jspns}newForm').validate({
			rules: {
				username : "required",
				password : "required",
				conformPassword : "required"
			}
		
		});
		
		$('#${jspns}newForm').submit(function() {
		  if($(this).validate().form()){
				$(this).omAjaxSubmit(submitOptions);
			}
			return false;//返回false,阻止浏览器默认行为
		});
		
		
	});
</script>
<form id="${jspns}newForm" method="post" action="<wst:webRoot/>/usermanagement/UserController/doSaveNew.do">
	用户名：<input id="${jspns}username" name="username"/><br>
	密码：<input id="${jspns}password" name="password" type="password"/><br>
	确认密码：<input id="${jspns}conformPassword" name="conformPassword" type="password"/><br>
	<input id="${jspns}saveBtn" type="submit" value="保存" />
</form>